const TOKENKEY = 'token_key'

const persistence = {
  setToken (token: string) {
    localStorage.setItem(TOKENKEY, token)
  },
  getToken (): string | null {
    return localStorage.getItem(TOKENKEY)
  },
  clearToken () {
    localStorage.removeItem(TOKENKEY)
  }
}

export default persistence